package com.hj.javaweb.controller;

import com.hj.javaweb.service.EventPublisherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author : hujing
 * @Date: 2025/6/20 15:17
 * @Description:
 */
@RestController
public class EventController {
    
    @Autowired
    private EventPublisherService eventPublisherService;
    
    @GetMapping("/publishEvent")
    public String publishEvent(@RequestParam String message){
        eventPublisherService.publishEvent(message);
        return "publish event success";
    }
}
